]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
UserMenu: fix disconnecting a signal that was never connected
authorGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 7 Aug 2012 14:33:02 +0000 (16:33 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 7 Aug 2012 15:44:17 +0000 (17:44 +0200)
If a disabled account is removed, we receive account-removed without
ever seeing account-enabled, and thus _changingId is undefined.

https://bugzilla.gnome.org/show_bug.cgi?id=681382

js/ui/userMenu.js

index 7f8d544de233a7aa04b4374ebbe30790b995edf3..9522134d058526f454c0e0c3971b0420b7715e1d 100644 (file)
@@ -654,8 +654,10 @@ const UserMenuButton = new Lang.Class({
     },
 
     _onAccountRemoved: function(accountMgr, account) {
-        account.disconnect(account._changingId);
-        account._changingId = 0;
+        if (account._changingId) {
+            account.disconnect(account._changingId);
+            account._changingId = 0;
+        }
         this._updateChangingPresence();
     },